import request from "../utils/request";

// 账号相关接口----------------------------------

// 获取用户列表
export const fetchAccoutListData = (params) => {
  return request({
    url: "/web/user/getList",
    method: "get",
    params: params,
  });
};

// 获取角色下拉框
export const fetchRoleSelect = (params) => {
  return request({
    url: "/web/roleResource/getRoleSelect",
    method: "get",
    params: params,
  });
};

// 创建/修改用户管理
export const fetchAccoutCreate = (data) => {
  return request({
    url: "/web/user/create",
    method: "post",
    data: data,
  });
};

// 删除用户管理
export const fetchDeleteAccout = (data) => {
  return request({
    url: "/web/user/deleteById",
    method: "post",
    data: data,
  });
};

// 管理端修改密码
export const fetchModifyPassword = (data) => {
  return request({
    url: "/web/user/modifyPassword",
    method: "post",
    data: data,
  });
};
